package com.caifu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.caifu.pojo.CDUser;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * ClassName: UserCDUserMapper.java
 *
 * @author: tianwenwen
 * createTime: 2020年12月25日 09:56:00
 **/
public interface UserCDUserMapper  extends BaseMapper<CDUser> {

    @Select("SELECT ud.id id, ud.user_no userNo, ud.device_id deviceId FROM c_d_user ud JOIN c_user u ON ud.user_no = u.user_no and ud.status = '1' and ud.is_issued = '0' and u.user_type = '1' ")
    List<Map<String, Object>> listDeviceUser();

}
